// 自定义静态topNav
import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import Layout from '@/layout'

Vue.use(Router)


export default [
  // 企业碳核算相关路由
  {
    path: '/enterpriseCarbonAccounting',
    redirect: '/dashboard',
    icon: 'system',
    name: '企业碳核算',
    component: Layout,
    children: [
      {
        // 企业碳核算
        path: '/',
        component: (resolve) => require(['@/template'], resolve),
        icon: 'system',
        redirect: '/dashboard',
        children: [{
          path: 'dashboard',
          name: 'Dashboard',
          component: () => import('@/views/enterpriseCarbonAccounting/carbonAccount/index'),
          meta: {title: '企业碳核算', icon: 'menu1'}
        }]
      },
      {
        // 数据质量管理
        path: 'dataQualityManage',
        visible: true,
        keepAlive: true,
        component: (resolve) => require(['@/template'], resolve),
        name: '数据质量管理',
        icon: 'system',
        alwaysShow: true,
        redirect: '/dataQualityManage/controlPlan',
        meta: {title: '数据质量管理', icon: 'menu2'},
        children: [
          {
            path: 'ControlPlan',
            name: '控制计划',
            visible: true,
            keepAlive: true,
            component: () => import('@/views/enterpriseCarbonAccounting/dataQualityManage/controlPlan'),
            meta: {title: '控制计划'}
          },
          {
            path: 'NewControlPlan',
            name: 'NewControlPlan',
            hidden: true,
            component: () => import('@/views/enterpriseCarbonAccounting/dataQualityManage/newControlPlan'),
            meta: {title: '控制计划详情'}
          },
        ]
      },
      {
        // 碳排放管理
        path: '/carbonEmissionManage',
        component: (resolve) => require(['@/views/login'], resolve),
        name: '碳排放管理',
        visible: true,
        keepAlive: true,
        icon: 'system',
        alwaysShow: true,
        redirect: '/carbonEmissionManage/dataQualityManage1',
        meta: {title: '碳排放管理', icon: 'menu3'},
        children: [
          {
            visible: true,
            keepAlive: true,
            path: 'CarbonEmissionAccount',
            name: '碳排放核算',
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/carbonEmissionAccount'),
            meta: {title: '碳排放核算'}
          },
          {
            path: 'NewCarbonAccount',
            name: '新增碳核算',
            hidden: true,
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/carbonEmissionAccount/newCarbonAccount'),
            meta: {title: '新增碳核算'}
          },
          {
            path: 'NewCarbonAccount1',
            name: 'NewCarbonAccount1',
            hidden: true,
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/carbonEmissionAccount/newCarbonAccount1'),
            meta: {title: '新增碳核算'}
          },
          {
            visible: true,
            keepAlive: true,
            path: 'AccountReport',
            name: '核算报告',
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/accountReport'),
            meta: {title: '核算报告'}
          },
          {
            path: 'NewAccountReport',
            name: 'NewAccountReport',
            hidden: true,
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/accountReport/newAccountReport'),
            meta: {title: '新增核算报告'}
          },
          {
            visible: true,
            keepAlive: true,
            path: 'AccountModel',
            name: '核算模型',
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/accountModel'),
            meta: {title: '核算模型'}
          },
          {
            path: 'EmissionSourceFactor',
            name: '排放源因子',
            hidden: true,
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/emissionSourceFactor'),
            meta: {title: '排放源因子'},
          },
          {
            path: 'ImportEmissionSource',
            name: 'ImportEmissionSource',
            hidden: true,
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/importEmissionSource'),
            meta: {title: '导入排放源'},
          },
          {
            path: 'SelectEmissionSourceDictionary',
            name: 'SelectEmissionSourceDictionary',
            hidden: true,
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/selectEmissionSourceDictionary'),
            meta: {title: '选择排放源'},
          },
          {
            path: 'AddEmissionSourceDictionary',
            name: 'AddEmissionSourceDictionary',
            hidden: true,
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/emissionSourceDictionary/addEmissionSourceDictionary'),
            meta: {title: '添加排放源字典'},
          },
          {
            visible: true,
            keepAlive: true,
            path: 'EmissionSourceDictionary',
            name: '排放源字典',
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionManage/emissionSourceDictionary'),
            meta: {title: '排放源字典'},
          },

        ]
      },
      {
        // 碳减排管理
        visible: true,
        keepAlive: true,
        path: '/carbonEmissionReductionManage',
        icon: 'system',
        component: (resolve) => require(['@/template'], resolve),
        name: '碳减排管理',
        alwaysShow: true,
        redirect: '/carbonEmissionReductionManage/emissionBasis',
        meta: {title: '碳减排管理', icon: 'menu4'},
        children: [
          {
            visible: true,
            keepAlive: true,
            path: 'EmissionBasis',
            name: '排放基准',
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionReductionManage/emissionBasis'),
            meta: {title: '排放基准'}
          },
          {
            visible: true,
            keepAlive: true,
            path: 'EmissionReductionScenario',
            name: '减排场景',
            component: () => import('@/views/enterpriseCarbonAccounting/carbonEmissionReductionManage/emissionReductionScenario'),
            meta: {title: '减排场景'}
          },
        ]
      },
      {
        // 下载管理
        visible: true,
        keepAlive: true,
        path: '/downloadManage',
        icon: 'system',
        component: (resolve) => require(['@/template'], resolve),
        name: '下载管理',
        alwaysShow: true,
        redirect: '/downloadManage/downloadLog',
        meta: {title: '下载管理', icon: 'menu5'},
        children: [
          {
            visible: true,
            keepAlive: true,
            path: 'DownloadLog',
            name: '下载管理',
            component: () => import('@/views/enterpriseCarbonAccounting/downloadManage/downloadLog'),
            meta: {title: '下载管理'}
          }
        ]
      },
    ]
  },
  // 产品碳足迹相关路由
  {
    path: '/carbonFootprintVerification',
    redirect: '/dashboard',
    icon: 'system',
    name: '产品碳足迹',
    component: Layout,
    children: [
      {
        // 报告管理
        path: '/reportManagement',
        component: Layout,
        icon: 'system',
        name: '报告管理',
        alwaysShow: true,
        visible: true,
        keepAlive: true,
        redirect: '/reportManagement/reportManagement',
        meta: {title: '报告管理', icon: 'menu5'},
        children: [
          {
            path: 'reportManagement',
            name: '报告管理',
            visible: true,
            keepAlive: true,
            component: () => import('@/views/carbonFootprintVerification/reportManagement'),
            meta: {title: '报告管理'}
          }
        ]
      },
      {
        // 碳足迹报告
        path: '/carbonFootprintReport',
        component: Layout,
        icon: 'system',
        name: '碳足迹报告',
        alwaysShow: true,
        visible: true,
        keepAlive: true,
        redirect: '/carbonFootprintReport/carbonFootprintReport',
        meta: {title: '碳足迹报告', icon: 'menu5'},
        children: [
          {
            visible: true,
            keepAlive: true,
            path: 'carbonFootprintReport',
            name: '碳足迹报告',
            component: () => import('@/views/carbonFootprintVerification/carbonFootprintReport'),
            meta: {title: '碳足迹报告'}
          }
        ]
      },
      {
        // 产品碳核算
        path: '/productCarbonAccounting',
        component: Layout,
        icon: 'system',
        visible: true,
        keepAlive: true,
        name: '产品碳核算',
        alwaysShow: true,
        redirect: '/productCarbonAccounting/productCarbonAccounting',
        meta: {title: '产品碳核算', icon: 'menu5'},
        children: [
          {
            icon: 'system',
            visible: true,
            keepAlive: true,
            path: 'productCarbonAccounting',
            name: '产品碳核算',
            component: () => import('@/views/carbonFootprintVerification/productCarbonAccounting'),
            meta: {title: '产品碳核算'}
          },
          {
            // visible: true,
            // keepAlive: true,
            icon: 'system',
            path: 'addProductCarbonAccounting',
            name: '产品碳核算',
            hidden: true,
            component: () => import('@/views/carbonFootprintVerification/productCarbonAccounting/addProductCarbonAccounting'),
            meta: {title: '产品碳核算'}
          }
        ]
      },
      {
        // 产品管理
        path: '/productManagement',
        component: Layout,
        name: '产品管理',
        alwaysShow: true,
        visible: true,
        keepAlive: true,
        icon: 'system',
        redirect: '/productManagement/productManagement',
        meta: {title: '产品管理', icon: 'menu5'},
        children: [
          {
            path: 'productManagement',
            name: '产品管理',
            icon: 'system',
            visible: true,
            keepAlive: true,
            component: () => import('@/views/carbonFootprintVerification/productManagement'),
            meta: {title: '产品管理'}
          }
        ]
      },
      {
        // 核算模型
        path: '/accountingModel',
        component: Layout,
        name: '核算模型',
        alwaysShow: true,
        icon: 'system',
        visible: true,
        keepAlive: true,
        redirect: '/accountingModel/accountingModel',
        meta: {title: '核算模型', icon: 'menu5'},
        children: [
          {
            path: 'accountingModel',
            name: '核算模型',
            visible: true,
            keepAlive: true,
            icon: 'system',
            component: () => import('@/views/carbonFootprintVerification/accountingModel'),
            meta: {title: '核算模型'}
          }
        ]
      },
      {
        // 工艺管理
        path: '/processManagement',
        component: Layout,
        name: '工艺管理',
        alwaysShow: true,
        icon: 'system',
        visible: true,
        keepAlive: true,
        redirect: '/processManagement/processManagement',
        meta: {title: '工艺管理', icon: 'menu5'},
        children: [
          {
            path: 'processManagement',
            name: '工艺管理',
            icon: 'system',
            visible: true,
            keepAlive: true,
            component: () => import('@/views/carbonFootprintVerification/processManagement'),
            meta: {title: '工艺管理'}
          },
          {
            path: 'addProcessManagement',
            name: '工艺管理',
            icon: 'system',

            hidden: true,
            component: () => import('@/views/carbonFootprintVerification/processManagement/addProcessManagement'),
            meta: {title: '工艺管理'}
          },
        ]
      },
      {
        // 添加排放源
        path: '/addEmissionSource',
        component: Layout,
        name: '添加排放源',
        icon: 'system',
        hidden: true,
        visible: true,
        keepAlive: true,
        redirect: '/addEmissionSource/addEmissionSource',
        meta: {title: '添加排放源', icon: 'menu5'},
        children: [
          {
            visible: true,
            keepAlive: true,
            icon: 'system',
            path: 'addEmissionSource',
            name: '添加排放源',
            component: () => import('@/views/carbonFootprintVerification/addEmissionSource'),
            meta: {title: '添加排放源'}
          }
        ]
      },
    ]
  }

]
